import json
from urllib.request import urlretrieve

import requests

from utils import Download

with open('uk10k.json','r') as f:
    data_source = json.load(f)

for i in data_source['urls']:
    # download = Download(url=i,dirName='uk10k')
    # download.start()

# res=requests.get(url='ftp://ngs.sanger.ac.uk/production/uk10k/UK10K_COHORT/REL-2012-06-02/UK10K_COHORT.20160215.sites.vcf.gz',stream=True)
# print(res.status_code)
    urlretrieve(i,i.split('/')[-1])


# ftp://ngs.sanger.ac.uk/production/uk10k/UK10K_COHORT/REL-2012-06-02/UK10K_COHORT.20160215.sites.vcf.gz